﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPagePrivate.master" AutoEventWireup="true" CodeFile="CustomerUserChange.aspx.cs" Inherits="Pages_Admin_CustomerUserChange" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <h4 id="h4Heading" runat="server">Add User</h4>    
    <div id="divMessage" runat="server" visible="false" enableviewstate="false"></div>    
    <div class="clearboth"></div>
    <a href="/Pages/Admin/CustomerUserList.aspx?<%=AppConstants.QueryString.CUSTOMER_ID %>=<%= _CustomerID %>">Back to User List</a>
    <asp:Panel ID="pnlFormContainer" runat="server" DefaultButton="btnSave">
        <%--User Information Group Box Start--%>        
        
        <div class="WizardContainer">
            <div class="StepHeaderContainer">
                <div class="StepHeading">
                    <asp:Label ID="lblFormTitle" runat="server" Text="Manage Customer User"></asp:Label>
                </div>
                <div class="StepSubHeading"><asp:Label ID="lblFormSubTitle" runat="server" Text="Add/Edit Customer User"></asp:Label></div>
            </div>
            <div class="StepBody">
                <table cellpadding="3" cellspacing="0" style="width:70%;">
                    <colgroup>
                        <col style="width:20%;" />
                        <col />                                        
                    </colgroup>

				    <tr>
					    <td>Login Name<span class="requiredMark">*</span></td>
					    <td>
						    <asp:TextBox ID="txtLoginName" MaxLength="150" runat="server"></asp:TextBox>
						    <asp:RequiredFieldValidator ID="rfvLoginName" runat="server"
							    ControlToValidate="txtLoginName" SetFocusOnError="true"
							    ErrorMessage="Please Enter a Login Name." Display="Dynamic"
							    ValidationGroup="SaveInfo">
						    </asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvLoginName" runat="server"
                                ControlToValidate="txtLoginName" SetFocusOnError="true"
                                OnServerValidate="cvLoginName_ServerValidate"
							    ErrorMessage="Sorry! the Login Name is Taken. Please choose another." Display="Dynamic"
							    ValidationGroup="SaveInfo">
                            </asp:CustomValidator>
					    </td>
				    </tr>
				    <%--<tr>
					    <td>Group<span class="requiredMark">*</span></td>
					    <td>
						    <asp:DropDownList ID="ddlGroupID" runat="server"></asp:DropDownList>
						    <asp:RequiredFieldValidator ID="rfvGroupID" runat="server"
							    ControlToValidate="ddlGroupID" SetFocusOnError="true"
							    ErrorMessage="Please Select a Group." Display="Dynamic"
							    ValidationGroup="SaveInfo">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>--%>				    
				    <tr>
					    <td>Password</td>
					    <td>
						    <asp:TextBox ID="txtPassword" TextMode="Password" MaxLength="50" runat="server"></asp:TextBox>
						    <asp:RequiredFieldValidator ID="rfvPassword" runat="server"
							    ControlToValidate="txtPassword" SetFocusOnError="true"
							    ErrorMessage="Please Enter a Password." Display="Dynamic"
							    ValidationGroup="SaveInfo">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>
                    <%--<tr>
                        <td><asp:Label ID="lblConfirmPassword" runat="server" Text="Confirm Password"></asp:Label><span class="requiredMark">*</span></td>
                        <td>
                            <asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server" MaxLength="50"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvConfirmPassword" runat="server"
                                Display="Dynamic" SetFocusOnError="true"
                                ControlToValidate="txtConfirmPassword" ValidationGroup="Step2"
                                ErrorMessage="Please Confirm your Password.">
                            </asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="cvConfirmPassword" runat="server"                                    
                                Display="Dynamic" SetFocusOnError="true"
                                ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword" Operator="Equal" 
                                ValidationGroup="Step2"
                                ErrorMessage="Two Password does not match.">
                            </asp:CompareValidator>
                        </td>                            
                    </tr>--%>
				    <%--
                    <tr>
					    <td>Customer<span class="requiredMark">*</span></td>
					    <td>
						    <asp:DropDownList ID="ddlCustomerID" runat="server"></asp:DropDownList>
						    <asp:RequiredFieldValidator ID="rfvCustomerID" runat="server"
							    ControlToValidate="ddlCustomerID" SetFocusOnError="true"
							    ErrorMessage="Please Select a Customer." Display="Dynamic"
							    ValidationGroup="SaveInfo">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr>
				    <tr>
					    <td>IsDeleted</td>
					    <td>
						    <asp:CheckBox ID="chkIsDeleted" runat="server"/>
					    </td>
				    </tr>
                    --%> 
				    <tr>
					    <td>Contact<span class="requiredMark">*</span></td>
					    <td>
						    <asp:DropDownList ID="ddlContactID" runat="server"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvCustomerID" runat="server"
							    ControlToValidate="ddlContactID" SetFocusOnError="true"
							    ErrorMessage="Please Select a Contact." Display="Dynamic"
							    ValidationGroup="SaveInfo">
						    </asp:RequiredFieldValidator>
					    </td>
				    </tr> 
                    <tr>
					    <td>Is Active?</td>
					    <td>
						    <asp:CheckBox ID="chkIsActive" runat="server"/>
					    </td>
				    </tr>                  
                </table>
            </div>
            <div class="StepButtonContainer">
                <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="SaveInfo" OnClick="btnSave_Click" />            
                <asp:Button ID="btnList" runat="server" Text="View List" OnClick="btnList_Click" Visible="false" />            
            </div>
        </div>
        <%--User Information Group Box End--%>
   </asp:Panel> 
</asp:Content>


